Skip to content

Added documentation support to Skyline Tool Store#610

Open
brendanx67 wants to merge 1 commit intorelease25.11-SNAPSHOTfrom
25.11_fb_toolstore-docs
Open

Added documentation support to Skyline Tool Store#610
brendanx67 wants to merge 1 commit intorelease25.11-SNAPSHOTfrom
25.11_fb_toolstore-docs

Conversation

@brendanx67
Copy link
Collaborator

Summary

  • Extract tool-inf/docs/ from uploaded tool ZIPs and serve HTML documentation via WebDAV (/_webdav/.../@files/docs/)
  • Show "Online Documentation" link in the Documentation box on tool details page when docs/index.html exists
  • Carry forward docs from previous version when new ZIP omits them (same pattern as supplementary files)
  • Fix icon extraction to skip images under tool-inf/docs/ so screenshot PNGs don't replace the tool icon
  • Exclude docs directory from supplementary file listings
  • Fall back to /home/support when no tool-specific support board exists, so new tools default to the Skyline support board

Test plan

  • Uploaded SkylineMcpConnector ZIP with tool-inf/docs/ — docs extracted, "Online Documentation" link appears, renders correctly in new tab
  • Tool icon displays correctly (not replaced by docs screenshot)
  • Support Board button navigates to /home/support for tools without a dedicated support board
  • Support Board button still navigates to tool-specific board (e.g., AvantGardeDIA) when one exists
  • Supplementary files section does not show docs directory

Co-Authored-By: Claude noreply@anthropic.com

* Extract docs from tool-inf/docs/ in uploaded ZIPs and serve via WebDAV
* Carry forward docs from previous version when new ZIP has none
* Show "Online Documentation" link in Documentation box when docs exist
* Skip tool-inf/docs/ images during icon extraction
* Exclude docs dir from supplementary file listings
* Fall back to /home/support when no tool-specific support board exists

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for tool-provided HTML documentation in the Skyline Tool Store by extracting tool-inf/docs/ from uploaded ZIPs, serving it via WebDAV, and surfacing an “Online Documentation” link on the tool details page. Also improves upload behavior by carrying documentation forward across versions, prevents docs images from being mistaken as the tool icon, hides docs from supplementary listings, and adjusts Support Board fallback behavior.

Changes:

  • Extract tool-inf/docs/ into a docs/ folder under the tool’s file root and (when missing) copy forward docs from the previous version.
  • Add “Online Documentation” link in the tool details UI when docs/index.html exists.
  • Prevent docs content from affecting icon selection and exclude docs from supplementary file listings; add Support Board fallback to /home/support.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
SkylineToolsStore/src/org/labkey/skylinetoolsstore/view/SkylineToolDetails.jsp Adds Support Board fallback selection and conditionally displays an “Online Documentation” link.
SkylineToolsStore/src/org/labkey/skylinetoolsstore/model/SkylineTool.java Adds helpers to detect docs presence and compute the WebDAV URL to docs/index.html.
SkylineToolsStore/src/org/labkey/skylinetoolsstore/SkylineToolsStoreController.java Skips tool-inf/docs/ during icon discovery, extracts docs from ZIPs (with zip-slip protection), copies docs forward when absent, and excludes docs from supplementary file basenames.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 303 to +314
<button id="tool-support-board-btn" class="banner-button-small">Support Board</button>
<% addHandler("tool-support-board-btn", "click", "window.open(" + q(urlProvider(ProjectUrls.class).getBeginURL(getContainer().getChild("Support").getChild(tool.getName()))) + ", '_blank', 'noopener,noreferrer')"); %>
<%
Container supportContainer = getContainer().getChild("Support");
Container toolSupportBoard = supportContainer != null ? supportContainer.getChild(tool.getName()) : null;
Container supportTarget;
if (toolSupportBoard != null)
supportTarget = toolSupportBoard;
else
supportTarget = ContainerManager.getForPath("/home/support");
if (supportTarget != null)
addHandler("tool-support-board-btn", "click", "window.open(" + q(urlProvider(ProjectUrls.class).getBeginURL(supportTarget)) + ", '_blank', 'noopener,noreferrer')");
%>
Comment on lines +347 to +350
<% if (tool.hasDocumentation() || suppIter.hasNext()) { %>
<div id="documentationbox" class="itemsbox">
<legend>Documentation</legend>
<% if (tool.hasDocumentation()) { %>
@@ -178,7 +178,8 @@ protected SkylineTool getToolFromZip(MultipartFile zip) throws IOException
while ((zipEntry = zipStream.getNextEntry()) != null &&
(tool == null || tool.getIcon() == null))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants